package com.app.params.utlis;

import android.util.Log;

import com.app.params.bean.ParamsBean;

import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.List;

import sql.DaoSession;

public class Tools {
    public static void runAdb(String str) {
        try {
            Runtime process = Runtime.getRuntime();
            Process proc = process.exec("su");
            DataOutputStream os = new DataOutputStream((proc.getOutputStream()));
            os.writeBytes("adb root\n");
            os.writeBytes("adb remount\n");
            os.writeBytes(str + "\n");
            os.flush();
            InputStreamReader reader = new InputStreamReader(proc.getInputStream());
            BufferedReader br = new BufferedReader(reader);
            String c;
            while ((c = br.readLine()) != null) {
                Log.w("yy", c);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
